import UIKit

//
@available(iOS 2.0, *)
extension QKC where AA :UIPickerView {
		// default is nil. weak reference
     open func dataSource_qk_s(_ dataSource:  UIPickerViewDataSource? ) -> QKC<AA,YY,ZZ, UIPickerViewDataSource? >{
		return link(next: dataSource).then_QK { $0.value.dataSource = dataSource }
	}
     open func dataSource_qk_g() -> QKC<AA,YY,ZZ, UIPickerViewDataSource? >{
		 self +^ self.value.dataSource
	}

		// default is nil. weak reference
     open func delegate_qk_s(_ delegate:  UIPickerViewDelegate? ) -> QKC<AA,YY,ZZ, UIPickerViewDelegate? >{
		return link(next: delegate).then_QK { $0.value.delegate = delegate }
	}
     open func delegate_qk_g() -> QKC<AA,YY,ZZ, UIPickerViewDelegate? >{
		 self +^ self.value.delegate
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "This property has no effect on iOS 7 and later.")
    open func showsSelectionIndicator_qk_s(_ showsSelectionIndicator:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: showsSelectionIndicator).then_QK { $0.value.showsSelectionIndicator = showsSelectionIndicator }
	}
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "This property has no effect on iOS 7 and later.")
    open func showsSelectionIndicator_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.showsSelectionIndicator
	}

	// info that was fetched and cached from the data source and delegate
    open func numberOfComponents_qk_g() -> QKC<AA,YY,ZZ, Int >{
		 self +^ self.value.numberOfComponents
	}

    open func numberOfRows_qk_f(inComponent component: Int) -> QKC<AA,YY,ZZ,Int>{
		 self +^ self.value.numberOfRows(inComponent:component)
	}

    open func rowSize_qk_f(forComponent component: Int) -> QKC<AA,YY,ZZ,CGSize>{
		 self +^ self.value.rowSize(forComponent:component)
	}

	// pickerView:viewForRow:forComponent:reusingView:
    open func view_qk_f(forRow row: Int, forComponent component: Int) -> QKC<AA,YY,ZZ,UIView?>{
		 self +^ self.value.view(forRow:row, forComponent:component)
	}

	// Reloading whole view or single component
    open func reloadAllComponents_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.reloadAllComponents()
	}

    open func reloadComponent_qk_f(_ component: Int) -> QKC<AA,YY,ZZ, Int>{
		 self +^ self.value.reloadComponent(component) +^ component
	}

	// selection. in this case, it means showing the appropriate row in the middle
		// scrolls the specified row to center.
    open func selectRow_qk_f(_ row: Int, inComponent component: Int, animated: Bool) -> QKC<AA,YY,ZZ, Int>{
		 self +^ self.value.selectRow(row, inComponent:component, animated:animated) +^ row
	}

		// returns selected row. -1 if nothing selected
    open func selectedRow_qk_f(inComponent component: Int) -> QKC<AA,YY,ZZ,Int >{
		 self +^ self.value.selectedRow(inComponent:component)
	}

}

